package model

import "time"

const IsOpenCommentYes = 1

const IsTopYes = 1

const IsRecommendedYes = 1

type Article struct {
	Id            int       `json:"id"`
	Title         string    `json:"title"`
	Desc          string    `json:"desc"`
	Content       string    `json:"content"`
	CoverImage    string    `json:"cover_image"`
	IsOpenComment int8      `json:"is_open_comment"`
	IsTop         int8      `json:"is_top"`
	IsRecommended int8      `json:"is_recommended"`
	ViewCount     int       `json:"view_count"`
	AdminId       int       `json:"admin_id"`
	PublishDt     string    `json:"publish_dt"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

func (Article) TableName() string {
	return "article"
}
